#pragma once
#include <windows.h>
#include <string.h>
#include <gdiplus.h>
#include <mmsystem.h>
#include <tchar.h>
//#include <math.h>

using namespace Gdiplus;
#pragma comment (lib,"Gdiplus.lib")


class Stulpeliai
{
private:
	HWND hWnd;
	int x, y, width, height, count;
	float *heightData;
	int lastTime;
	int playingTime;
	int drawMode;
	int drawModeCount;
public:
	Stulpeliai(int x, int y, int width, int height, int count, HWND hWnd)
	{
		this->hWnd = hWnd;
		this->x = x;
		this->y = y;
		this->width = width;
		this->height = height;
		this->count = count;
		heightData = new float[count];
		for(int i = 0; i < count; i++) { heightData[i] = 0; }
		playingTime = 0;

		drawMode = 2; // default
		drawModeCount = 5;
	}

	~Stulpeliai()
	{
		delete[] heightData;
	}

	int click();
	void setDrawMode(int m);
	void update(float *fl, int time);
	void draw(HDC hdc);





};